import Vue from 'vue'
import App from './App.vue'
import VueRouter from 'vue-router';
import {routes} from './routes';
import axios from 'axios';
axios.defaults.withCredentials = true;
import VueAxios from 'vue-axios';
import {store} from './store';

import BootstrapVue from 'bootstrap-vue';
import 'bootstrap/dist/css/bootstrap.css';
import 'bootstrap-vue/dist/bootstrap-vue.css';
import qs from 'qs';


Vue.use(VueAxios,axios);
Vue.use(VueRouter);
Vue.use(BootstrapVue);
Vue.prototype.$qs = qs;
Vue.prototype.$config=config;


const router = new VueRouter({
  routes: routes,
  mode  : 'history'
});

router.afterEach((to,from,next) => {
  window.scrollTo(0,0);
})

Vue.prototype.$htRem = ()=> {
  var ww                                      = document.documentElement.clientWidth;
      document.documentElement.style.fontSize = ww / 19.2 + "px";
},



new Vue({
  el: '#app',
  store,
  router,
  render: h => h(App)
})
